package com.hitqz.robot.api.business.dto;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author wengyx
 * @date 2024/8/7
 * 检测设备
 */
@Data
public class PatrolResultWarningDto {
    private Long id;
    private Integer ticketsId;
    private String roomName;
    private String devName;
    private String itemName;
    private String checkTime;
    private String createTime;
    private String showValue;
    private String normalValue;
    private String mediaUrl;
    private String visionMediaUrl;
    private Integer auditStatus;
    private String auditor;
    private String auditRemark;
    private String auditTime;
    private String content;

    public String getContent() {
        String normalValueStr = StrUtil.isNotBlank(normalValue) ?  "标准参考:"+normalValue.replace(",","~") : "";
        return "(" + devName + ")" + itemName + "检测值:" + showValue + " 异常," + normalValueStr;
    }
}
